/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package egresados4;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 *
 * @author murrieta
 */
@Entity
@Table(name = "HISTORIAL", catalog = "", schema = "EGRESADOS")
@NamedQueries({@NamedQuery(name = "Historial.findAll", query = "SELECT h FROM Historial h"), @NamedQuery(name = "Historial.findByRfc", query = "SELECT h FROM Historial h WHERE h.rfc = :rfc"), @NamedQuery(name = "Historial.findByLicenciatura", query = "SELECT h FROM Historial h WHERE h.licenciatura = :licenciatura"), @NamedQuery(name = "Historial.findByInstitucion", query = "SELECT h FROM Historial h WHERE h.institucion = :institucion"), @NamedQuery(name = "Historial.findByAnoingreso", query = "SELECT h FROM Historial h WHERE h.anoingreso = :anoingreso"), @NamedQuery(name = "Historial.findByAnotitulacion", query = "SELECT h FROM Historial h WHERE h.anotitulacion = :anotitulacion"), @NamedQuery(name = "Historial.findByBecadopor", query = "SELECT h FROM Historial h WHERE h.becadopor = :becadopor"), @NamedQuery(name = "Historial.findByTitulodetesis", query = "SELECT h FROM Historial h WHERE h.titulodetesis = :titulodetesis"), @NamedQuery(name = "Historial.findByMaestria", query = "SELECT h FROM Historial h WHERE h.maestria = :maestria"), @NamedQuery(name = "Historial.findByInsitucionmaestria", query = "SELECT h FROM Historial h WHERE h.insitucionmaestria = :insitucionmaestria"), @NamedQuery(name = "Historial.findByAnoingresomaestria", query = "SELECT h FROM Historial h WHERE h.anoingresomaestria = :anoingresomaestria"), @NamedQuery(name = "Historial.findByAnotitulacionmaestria", query = "SELECT h FROM Historial h WHERE h.anotitulacionmaestria = :anotitulacionmaestria"), @NamedQuery(name = "Historial.findByMaestriabecadopor", query = "SELECT h FROM Historial h WHERE h.maestriabecadopor = :maestriabecadopor"), @NamedQuery(name = "Historial.findByTitulotesismaestria", query = "SELECT h FROM Historial h WHERE h.titulotesismaestria = :titulotesismaestria"), @NamedQuery(name = "Historial.findByDoctorado", query = "SELECT h FROM Historial h WHERE h.doctorado = :doctorado"), @NamedQuery(name = "Historial.findByInstituciondoctorado", query = "SELECT h FROM Historial h WHERE h.instituciondoctorado = :instituciondoctorado"), @NamedQuery(name = "Historial.findByAnoingresodoctorado", query = "SELECT h FROM Historial h WHERE h.anoingresodoctorado = :anoingresodoctorado"), @NamedQuery(name = "Historial.findByAnotitulaciondoctorado", query = "SELECT h FROM Historial h WHERE h.anotitulaciondoctorado = :anotitulaciondoctorado"), @NamedQuery(name = "Historial.findByDoctoradobecadopor", query = "SELECT h FROM Historial h WHERE h.doctoradobecadopor = :doctoradobecadopor"), @NamedQuery(name = "Historial.findByTitulodoctorado", query = "SELECT h FROM Historial h WHERE h.titulodoctorado = :titulodoctorado"), @NamedQuery(name = "Historial.findByDiplomados", query = "SELECT h FROM Historial h WHERE h.diplomados = :diplomados"), @NamedQuery(name = "Historial.findByCursosespeciales", query = "SELECT h FROM Historial h WHERE h.cursosespeciales = :cursosespeciales")})
public class Historial implements Serializable {
    @Transient
    private PropertyChangeSupport changeSupport = new PropertyChangeSupport(this);
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "RFC")
    private String rfc;
    @Basic(optional = false)
    @Column(name = "LICENCIATURA")
    private String licenciatura;
    @Column(name = "INSTITUCION")
    private String institucion;
    @Column(name = "ANOINGRESO")
    private String anoingreso;
    @Column(name = "ANOTITULACION")
    private String anotitulacion;
    @Column(name = "BECADOPOR")
    private String becadopor;
    @Column(name = "TITULODETESIS")
    private String titulodetesis;
    @Column(name = "MAESTRIA")
    private String maestria;
    @Column(name = "INSITUCIONMAESTRIA")
    private String insitucionmaestria;
    @Column(name = "ANOINGRESOMAESTRIA")
    private String anoingresomaestria;
    @Column(name = "ANOTITULACIONMAESTRIA")
    private String anotitulacionmaestria;
    @Column(name = "MAESTRIABECADOPOR")
    private String maestriabecadopor;
    @Column(name = "TITULOTESISMAESTRIA")
    private String titulotesismaestria;
    @Column(name = "DOCTORADO")
    private String doctorado;
    @Column(name = "INSTITUCIONDOCTORADO")
    private String instituciondoctorado;
    @Column(name = "ANOINGRESODOCTORADO")
    private String anoingresodoctorado;
    @Column(name = "ANOTITULACIONDOCTORADO")
    private String anotitulaciondoctorado;
    @Column(name = "DOCTORADOBECADOPOR")
    private String doctoradobecadopor;
    @Column(name = "TITULODOCTORADO")
    private String titulodoctorado;
    @Column(name = "DIPLOMADOS")
    private String diplomados;
    @Column(name = "CURSOSESPECIALES")
    private String cursosespeciales;
    @JoinColumn(name = "GENERALES_RFC", referencedColumnName = "RFC")
    @ManyToOne(optional = false)
    private Generales generalesRfc;

    public Historial() {
    }

    public Historial(String rfc) {
        this.rfc = rfc;
    }

    public Historial(String rfc, String licenciatura) {
        this.rfc = rfc;
        this.licenciatura = licenciatura;
    }

    public String getRfc() {
        return rfc;
    }

    public void setRfc(String rfc) {
        String oldRfc = this.rfc;
        this.rfc = rfc;
        changeSupport.firePropertyChange("rfc", oldRfc, rfc);
    }

    public String getLicenciatura() {
        return licenciatura;
    }

    public void setLicenciatura(String licenciatura) {
        String oldLicenciatura = this.licenciatura;
        this.licenciatura = licenciatura;
        changeSupport.firePropertyChange("licenciatura", oldLicenciatura, licenciatura);
    }

    public String getInstitucion() {
        return institucion;
    }

    public void setInstitucion(String institucion) {
        String oldInstitucion = this.institucion;
        this.institucion = institucion;
        changeSupport.firePropertyChange("institucion", oldInstitucion, institucion);
    }

    public String getAnoingreso() {
        return anoingreso;
    }

    public void setAnoingreso(String anoingreso) {
        String oldAnoingreso = this.anoingreso;
        this.anoingreso = anoingreso;
        changeSupport.firePropertyChange("anoingreso", oldAnoingreso, anoingreso);
    }

    public String getAnotitulacion() {
        return anotitulacion;
    }

    public void setAnotitulacion(String anotitulacion) {
        String oldAnotitulacion = this.anotitulacion;
        this.anotitulacion = anotitulacion;
        changeSupport.firePropertyChange("anotitulacion", oldAnotitulacion, anotitulacion);
    }

    public String getBecadopor() {
        return becadopor;
    }

    public void setBecadopor(String becadopor) {
        String oldBecadopor = this.becadopor;
        this.becadopor = becadopor;
        changeSupport.firePropertyChange("becadopor", oldBecadopor, becadopor);
    }

    public String getTitulodetesis() {
        return titulodetesis;
    }

    public void setTitulodetesis(String titulodetesis) {
        String oldTitulodetesis = this.titulodetesis;
        this.titulodetesis = titulodetesis;
        changeSupport.firePropertyChange("titulodetesis", oldTitulodetesis, titulodetesis);
    }

    public String getMaestria() {
        return maestria;
    }

    public void setMaestria(String maestria) {
        String oldMaestria = this.maestria;
        this.maestria = maestria;
        changeSupport.firePropertyChange("maestria", oldMaestria, maestria);
    }

    public String getInsitucionmaestria() {
        return insitucionmaestria;
    }

    public void setInsitucionmaestria(String insitucionmaestria) {
        String oldInsitucionmaestria = this.insitucionmaestria;
        this.insitucionmaestria = insitucionmaestria;
        changeSupport.firePropertyChange("insitucionmaestria", oldInsitucionmaestria, insitucionmaestria);
    }

    public String getAnoingresomaestria() {
        return anoingresomaestria;
    }

    public void setAnoingresomaestria(String anoingresomaestria) {
        String oldAnoingresomaestria = this.anoingresomaestria;
        this.anoingresomaestria = anoingresomaestria;
        changeSupport.firePropertyChange("anoingresomaestria", oldAnoingresomaestria, anoingresomaestria);
    }

    public String getAnotitulacionmaestria() {
        return anotitulacionmaestria;
    }

    public void setAnotitulacionmaestria(String anotitulacionmaestria) {
        String oldAnotitulacionmaestria = this.anotitulacionmaestria;
        this.anotitulacionmaestria = anotitulacionmaestria;
        changeSupport.firePropertyChange("anotitulacionmaestria", oldAnotitulacionmaestria, anotitulacionmaestria);
    }

    public String getMaestriabecadopor() {
        return maestriabecadopor;
    }

    public void setMaestriabecadopor(String maestriabecadopor) {
        String oldMaestriabecadopor = this.maestriabecadopor;
        this.maestriabecadopor = maestriabecadopor;
        changeSupport.firePropertyChange("maestriabecadopor", oldMaestriabecadopor, maestriabecadopor);
    }

    public String getTitulotesismaestria() {
        return titulotesismaestria;
    }

    public void setTitulotesismaestria(String titulotesismaestria) {
        String oldTitulotesismaestria = this.titulotesismaestria;
        this.titulotesismaestria = titulotesismaestria;
        changeSupport.firePropertyChange("titulotesismaestria", oldTitulotesismaestria, titulotesismaestria);
    }

    public String getDoctorado() {
        return doctorado;
    }

    public void setDoctorado(String doctorado) {
        String oldDoctorado = this.doctorado;
        this.doctorado = doctorado;
        changeSupport.firePropertyChange("doctorado", oldDoctorado, doctorado);
    }

    public String getInstituciondoctorado() {
        return instituciondoctorado;
    }

    public void setInstituciondoctorado(String instituciondoctorado) {
        String oldInstituciondoctorado = this.instituciondoctorado;
        this.instituciondoctorado = instituciondoctorado;
        changeSupport.firePropertyChange("instituciondoctorado", oldInstituciondoctorado, instituciondoctorado);
    }

    public String getAnoingresodoctorado() {
        return anoingresodoctorado;
    }

    public void setAnoingresodoctorado(String anoingresodoctorado) {
        String oldAnoingresodoctorado = this.anoingresodoctorado;
        this.anoingresodoctorado = anoingresodoctorado;
        changeSupport.firePropertyChange("anoingresodoctorado", oldAnoingresodoctorado, anoingresodoctorado);
    }

    public String getAnotitulaciondoctorado() {
        return anotitulaciondoctorado;
    }

    public void setAnotitulaciondoctorado(String anotitulaciondoctorado) {
        String oldAnotitulaciondoctorado = this.anotitulaciondoctorado;
        this.anotitulaciondoctorado = anotitulaciondoctorado;
        changeSupport.firePropertyChange("anotitulaciondoctorado", oldAnotitulaciondoctorado, anotitulaciondoctorado);
    }

    public String getDoctoradobecadopor() {
        return doctoradobecadopor;
    }

    public void setDoctoradobecadopor(String doctoradobecadopor) {
        String oldDoctoradobecadopor = this.doctoradobecadopor;
        this.doctoradobecadopor = doctoradobecadopor;
        changeSupport.firePropertyChange("doctoradobecadopor", oldDoctoradobecadopor, doctoradobecadopor);
    }

    public String getTitulodoctorado() {
        return titulodoctorado;
    }

    public void setTitulodoctorado(String titulodoctorado) {
        String oldTitulodoctorado = this.titulodoctorado;
        this.titulodoctorado = titulodoctorado;
        changeSupport.firePropertyChange("titulodoctorado", oldTitulodoctorado, titulodoctorado);
    }

    public String getDiplomados() {
        return diplomados;
    }

    public void setDiplomados(String diplomados) {
        String oldDiplomados = this.diplomados;
        this.diplomados = diplomados;
        changeSupport.firePropertyChange("diplomados", oldDiplomados, diplomados);
    }

    public String getCursosespeciales() {
        return cursosespeciales;
    }

    public void setCursosespeciales(String cursosespeciales) {
        String oldCursosespeciales = this.cursosespeciales;
        this.cursosespeciales = cursosespeciales;
        changeSupport.firePropertyChange("cursosespeciales", oldCursosespeciales, cursosespeciales);
    }

    public Generales getGeneralesRfc() {
        return generalesRfc;
    }

    public void setGeneralesRfc(Generales generalesRfc) {
        Generales oldGeneralesRfc = this.generalesRfc;
        this.generalesRfc = generalesRfc;
        changeSupport.firePropertyChange("generalesRfc", oldGeneralesRfc, generalesRfc);
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (rfc != null ? rfc.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Historial)) {
            return false;
        }
        Historial other = (Historial) object;
        if ((this.rfc == null && other.rfc != null) || (this.rfc != null && !this.rfc.equals(other.rfc))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "egresados4.Historial[rfc=" + rfc + "]";
    }

    public void addPropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.addPropertyChangeListener(listener);
    }

    public void removePropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.removePropertyChangeListener(listener);
    }

}
